package pro2
object testTuple {
  def main(args: Array[String]): Unit = {
    //构建元组(1)
    val tuple=("Scala", 2023, 4.5)
    //构建元组(2)
    val tuple1 = new Tuple3("Scala",2023,4.5)
    println(tuple)
    //索引访问元素
    println(tuple._1)
    //元组转为字符串
    println("连接后的字符串为: " + tuple.toString() )

  }

}
